curried function - definition. What is curried function
Diclib.com
قاموس ChatGPT
أدخل كلمة أو عبارة بأي لغة 👆
اللغة:

ترجمة وتحليل الكلمات عن طريق الذكاء الاصطناعي ChatGPT

في هذه الصفحة يمكنك الحصول على تحليل مفصل لكلمة أو عبارة باستخدام أفضل تقنيات الذكاء الاصطناعي المتوفرة اليوم:

  • كيف يتم استخدام الكلمة في اللغة
  • تردد الكلمة
  • ما إذا كانت الكلمة تستخدم في كثير من الأحيان في اللغة المنطوقة أو المكتوبة
  • خيارات الترجمة إلى الروسية أو الإسبانية، على التوالي
  • أمثلة على استخدام الكلمة (عدة عبارات مع الترجمة)
  • أصل الكلمة

%ما هو (من)٪ 1 - تعريف

TRANSFORMING A FUNCTION IN SUCH A WAY THAT IT ONLY TAKES A SINGLE ARGUMENT
Curried function; Uncurrying; Schönfinkelisation; Curry (programming); Schoenfinkelisation; Curry function; Function currying; Schonfinkelisation; Curried; Schönfinkeling; Schönfinkelling; Schönfinkelization; Curried form; Currying concept; Uncurry; Curryfication

curried function         
<mathematics, programming> A function of N arguments that is considered as a function of one argument which returns another function of N-1 arguments. E.g. in Haskell we can define: average :: Int -> (Int -> Int) (The parentheses are optional). A partial application of average, to one Int, e.g. (average 4), returns a function of type (Int -> Int) which averages its argument with 4. In uncurried languages a function must always be applied to all its arguments but a partial application can be represented using a lambda abstraction: x -> average(4,x) Currying is necessary if full laziness is to be applied to functional sub-expressions. It was named after the logician Haskell Curry but the 19th-century logician, Gottlob Frege was the first to propose it and it was first referred to in ["Uber die Bausteine der mathematischen Logik", M. Schoenfinkel, Mathematische Annalen. Vol 92 (1924)]. David Turner said he got the term from {Christopher Strachey} who invented the term "currying" and used it in his lecture notes on programming languages written circa 1967. Strachey also remarked that it ought really to be called "Schoenfinkeling". Stefan Kahrs <smk@dcs.ed.ac.uk> reported hearing somebody in Germany trying to introduce "scho"nen" for currying and "finkeln" for "uncurrying". The verb "scho"nen" means "to beautify"; "finkeln" isn't a German word, but it suggests "to fiddle". ["Some philosophical aspects of combinatory logic", H. B. Curry, The Kleene Symposium, Eds. J. Barwise, J. Keisler, K. Kunen, North Holland, 1980, pp. 85-101] (2002-07-24)
currying         
Turning an uncurried function into a curried function.
curried         
Curried meat or vegetables have been flavoured with hot spices.
ADJ: ADJ n

ويكيبيديا

Currying

In mathematics and computer science, currying is the technique of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. For example, currying a function f {\displaystyle f} that takes three arguments creates a nested unary function g {\displaystyle g} , so that the code

let  x = f ( a , b , c ) {\displaystyle {\text{let }}x=f(a,b,c)}

gives x {\displaystyle x} the same value as the code

let  h = g ( a ) let  i = h ( b ) let  x = i ( c ) , {\displaystyle {\begin{aligned}{\text{let }}h=g(a)\\{\text{let }}i=h(b)\\{\text{let }}x=i(c),\end{aligned}}}

or called in sequence,

let  x = g ( a ) ( b ) ( c ) . {\displaystyle {\text{let }}x=g(a)(b)(c).}

In a more mathematical language, a function that takes two arguments, one from X {\displaystyle X} and one from Y {\displaystyle Y} , and produces outputs in Z , {\displaystyle Z,} by currying is translated into a function that takes a single argument from X {\displaystyle X} and produces as outputs functions from Y {\displaystyle Y} to Z . {\displaystyle Z.} This is a natural one-to-one correspondence between these two types of functions, so that the sets together with functions between them form a Cartesian closed category. The currying of a function with more than two arguments can then be defined by induction. Currying is related to, but not the same as, partial application.

Currying is useful in both practical and theoretical settings. In functional programming languages, and many others, it provides a way of automatically managing how arguments are passed to functions and exceptions. In theoretical computer science, it provides a way to study functions with multiple arguments in simpler theoretical models which provide only one argument. The most general setting for the strict notion of currying and uncurrying is in the closed monoidal categories, which underpins a vast generalization of the Curry–Howard correspondence of proofs and programs to a correspondence with many other structures, including quantum mechanics, cobordisms and string theory. It was introduced by Gottlob Frege, developed by Moses Schönfinkel, and further developed by Haskell Curry.

Uncurrying is the dual transformation to currying, and can be seen as a form of defunctionalization. It takes a function f {\displaystyle f} whose return value is another function g {\displaystyle g} , and yields a new function f {\displaystyle f'} that takes as parameters the arguments for both f {\displaystyle f} and g {\displaystyle g} , and returns, as a result, the application of f {\displaystyle f} and subsequently, g {\displaystyle g} , to those arguments. The process can be iterated.